<!doctype html>
<html>
	<head>
		<script src='http://192.168.1.21:8000/CLodopfuncs.js?priority=1'></script>
		<!--声明当前页面的编码集:charset=gbk,gb2312(中文编码), utf-8(国际编码)-->
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<!--当前页面的三要素-->
		<title>打印</title>
	</head>

<body>
	<script>
		function print(flag){
			LODOP.PRINT_INITA(1,1,770,660,"测试预览功能");
			//LODOP.ADD_PRINT_RECT(10,55,360,220,0,1);//画一个名片大小的矩形边框
			LODOP.SET_PRINT_STYLE("FontSize",11);//设置基本打印风格
			LODOP.ADD_PRINT_TEXT(20,180,100,25,"郭德强");//在矩形框内打印姓名栏
			//设置姓名栏的打印风格
			LODOP.SET_PRINT_STYLEA(2,"FontName","隶书"); 
			LODOP.SET_PRINT_STYLEA(2,"FontSize",15); 
			//其它内容
			LODOP.ADD_PRINT_TEXT(53,187,75,20,"科学家");
			LODOP.ADD_PRINT_TEXT(100,131,272,20,"地址：中国北京社会科学院附近东大街西胡同");
			LODOP.ADD_PRINT_TEXT(138,132,166,20,"电话：010-88811888");
			//条码
			//ADD_PRINT_BARCODE(150,132,166,20,"128A","12345678");
			//初始化并设置打印任务名
			LODOP.PRINT_INIT("打印插件功能演示_代码功能_名片");
			if(flag){
				LODOP.PREVIEW();
				//myPreview();
			}else{
				LODOP.PRINT();
			}
		};
		
		function CreateOnePage(){
			LODOP=getLodop();  
			LODOP.PRINT_INIT("打印控件功能演示_Lodop功能_设置预览窗口界面");
			LODOP.SET_PRINT_PAGESIZE(1,1380,880,"");
			LODOP.ADD_PRINT_TEXT(80,100,400,35,"观察预览窗口的变化");
			LODOP.SET_PRINT_STYLEA(0,"FontSize",30);
				
		};
		
		function myPreview() {	
			CreateOnePage();		
			LODOP.SET_PREVIEW_WINDOW(0,3,0,600,400,"");	
			LODOP.PREVIEW();	
		};
	</script>
</body>
</html>
